package com.fang.www.threadpool;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public  class ThreadPool {
	private Executor pool ;
	private Integer num;
	//整块我以后会重载个构造写出 singleton,fix,cache,schedule几种策略的线程池，目前的想法先从无到有
	public ThreadPool(Integer num) {
		super();
		this.num = num;
		this.pool = Executors.newFixedThreadPool(num);
	}
	public void submitWorker(Runnable runnable){
		pool.execute(runnable);
	}
}